global k
global r

k = [0 2 2 4; 0 2 -2 0];
r = [2 2 2 2];

handle = @kleinstekwadraten;
lsqnonlin(handle, [0 0])